home *** CD-ROM | disk | FTP | other *** search
- Path: news.cc.sunysb.edu!usenet
- From: dkat@psych1.psy.sunysb.edu (DK)
- Newsgroups: comp.lang.c
- Subject: Re: What is wrong with this loop?
- Date: Sat, 20 Apr 1996 20:34:36 GMT
- Organization: State University of New York at Stony Brook
- Message-ID: <4lb6sj$c5c@abel.cc.sunysb.edu>
- References: <4l86la$1t9@uwm.edu> <4l8apa$kv8@spanky.pls.ov.com>
- NNTP-Posting-Host: as3-14.noc080.sunysb.edu
- X-Newsreader: Forte Free Agent 1.0.82
-
-
- /* I assume you mean
- while (cd != 'm' || cd != 'f' || cd != 'o')
- /*try using gets(line) - it is always safer*/
-
- while(gets(line)!=NULL)
- {
- cd = line[0];
- if(cd != 'm' || cd != 'f' || cd != 'o')
- printf("Re-enter m, f, or o.\n");
- }
- /* I'm assuming you're only looking at the first char of a line -
- otherwise just bump through line - i'm guessing at your goal*/
-
-